<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    {% block meta %}<!-- block meta  -->{% endblock %}
    <title>{% block title %} ? {% endblock %} - chenxiaojie python webapp</title>
    <link rel="stylesheet" href="/static/css/uikit.min.css">
    <link rel="stylesheet" href="/static/css/uikit.gradient.min.css">
    <link rel="stylesheet" href="/static/css/awesome.css" />
    <script src="/static/js/jquery.min.js"></script>
    <script src="/static/js/sha1.min.js"></script>
    <script src="/static/js/uikit.min.js"></script>
    <script src="/static/js/sticky.min.js"></script>
    <script src="/static/js/vue.min.js"></script>
    <script src="/static/js/awesome.js"></script>
    <!--
    {% macro pagination(url, page) %}
        <ul class="uk-pagination">
            {% if page.has_previous %}
            <li>
                <a href="{{ url }}{{ page.page_index - 1 }}">&lt;</a>
            </li>
            {% endif %}

            {% set previous_nums = [1] %}
            {% for page_num in range(1, page.page_count + 1) %}
                {% if page_num != page.page_index %}
                    {% if page_num in page.show_pages %}
                         {% set index = previous_nums | length - 1 %}
                         {% if page_num - previous_nums[index] > 2 %}
                            <li>
                                <span>...</span>
                            </li>
                        {% endif %}
                        <li>
                            <a href="{{ url }}{{ page_num }}">{{ page_num }}</a>
                        </li>
                        {% if previous_nums.append(page_num) %}{% endif %}
                   {% endif %}
                {% else %}
                    <li class="uk-active">
                        <span>{{ page_num }}</span>
                    </li>
                    {% if previous_nums.append(page_num) %}{% endif %}
                {% endif %}
            {% endfor %}

            {% if page.has_next %}
            <li>
               <a href="{{ url }}{{ page.page_index + 1 }}">&gt;</a>
            </li>
            {% endif %}
            <li>
                <span>共{{ page.item_count }}条</span>
            </li>
        </ul>

    {% endmacro %}
    -->
    {% block beforehead %}<!-- before head  -->{% endblock %}
</head>
<body>
    <nav class="uk-navbar uk-navbar-attached uk-margin-bottom">
        <div class="uk-container uk-container-center">
            <a href="/" class="uk-navbar-brand">MVC</a>
            <ul class="uk-navbar-nav">
                <li data-url="blogs"><a href="#"><i class="uk-icon-home"></i>博客</a></li>
                <li><a href="#"><i class="uk-icon-book"></i>教程</a></li>
                <li><a href="#"><i class="uk-icon-code"></i>源码</a></li>
            </ul>
            <div class="uk-navbar-flip">
                <ul class="uk-navbar-nav">
                {% if __user__ %}
                    <li class="uk-parent" data-uk-dropdown>
                        <a href="#0"><i class="uk-icon-user"></i> {{ __user__.name }}</a>
                        <div class="uk-dropdown uk-dropdown-navbar">
                            <ul class="uk-nav uk-nav-navbar">
                                <li><a href="/user/logout"><i class="uk-icon-sign-out"></i>退出</a></li>
                            </ul>
                        </div>
                    </li>
                {% else %}
                    <li><a href="/user/login.html"><i class="uk-icon-sign-in"></i>登录</a></li>
                    <li><a href="/user/register.html"><i class="uk-icon-edit"></i>注册</a></li>
                {% endif %}
                </ul>
            </div>
        </div>
    </nav>

    <div class="uk-container uk-container-center">
        <div class="uk-grid">
            <!-- content -->
            {% block content %}
            {% endblock %}
            <!-- // content -->
        </div>
    </div>

    <div class="uk-margin-large-top" style="background-color:#eee; border-top:1px solid #ccc;">
        <div class="uk-container uk-container-center uk-text-center">
            <div class="uk-panel uk-margin-top uk-margin-bottom">
                <p>
                    <a target="_blank" href="https://weibo.com/chenxiaojievip" class="uk-icon-button uk-icon-weibo"></a>
                    <a target="_blank" href="https://github.com/chenxiaojie" class="uk-icon-button uk-icon-github"></a>
                </p>
                <p>Powered by <a target="_blank" href="http://www.chenxiaojie.com">chenxiaojie python webapp</a>. Copyright &copy; 2018. [<a href="/manage" target="_blank">manage</a>]</p>
                <p><a href="http://www.chenxiaojie.com/" target="_blank">www.chenxiaojie.com</a>. All rights reserved.</p>
                <a target="_blank" href="http://www.w3.org/TR/html5/"><i class="uk-icon-html5" style="font-size:64px; color: #444;"></i></a>
            </div>
        </div>
    </div>
</body>
</html>
